#ifndef WEBRTC_OHOS_DISPLAY_MANAGER_H_
#define WEBRTC_OHOS_DISPLAY_MANAGER_H_
#include <memory>
#include <mutex>
#include <window_manager/oh_display_manager.h>

namespace webrtc {

class DisplayManagerOhos {
 public:
  static std::shared_ptr<DisplayManagerOhos> GetInstance();

  ~DisplayManagerOhos();

  void Init();

  void SetDefaultDisplayOrientation(NativeDisplayManager_Orientation orientation);

  void SetDefaultDisplayRotation(NativeDisplayManager_Rotation rotation);

  NativeDisplayManager_Orientation GetDefaultDisplayOrientation() {return default_display_orientation_;}
  NativeDisplayManager_Rotation GetDefaultDisplayRotation() {return default_display_rotation_;}

private:
  DisplayManagerOhos();

 private:

  NativeDisplayManager_Orientation default_display_orientation_;
  NativeDisplayManager_Rotation default_display_rotation_;
  uint32_t listener_index = 0;
  bool inited_ = false;
};

} // namespace webrtc

#endif //WEBRTC_OHOS_DISPLAY_MANAGER_H_
